<div id="shim_tag_box" style="float:right">
  <% attribute_name = "tag" %>
  <% annotations = annotatable.annotations_with_attribute(attribute_name) %>
  
  <b>TAGS 
  <% if logged_in? %>
    <%= link_to_function("[+]", visual_effect(:toggle_slide,
        "add_" + annotatable.class.name.downcase + "_" + attribute_name + annotatable.id.to_s,
        :duration => 0.3), :class => "active", :style => "") -%>
  <% else %>
    <% session[:original_uri] = request.request_uri %>
    <%= link_to ("[+]"), :controller => "home", :action => "login" %>
  <% end %>
  </b>
  
  <br />
  
  <% if annotations %>
    <% annotations.each do |ann| %>
      <%= link_to CGI::escapeHTML(ann.value), :controller => "shims", :action => "with_annotation", 
          :attribute_name => attribute_name, :value => CGI::escapeHTML(ann.value) %>
        
      <%= link_to '[x]', ann, :confirm => 'Are you sure you want to delete this annotation?  This cannot be undone.', 
          :method => :delete if logged_in? && ann.source==current_user %>               
     
      &nbsp;<strong><%=h "  |  " unless ann==annotations.last %></strong>&nbsp;
    <% end %><br/>
  <% end %>
  
  <%= render :partial => 'annotations/annotation_form', :locals => {
      :attribute_name => attribute_name, :annotatable_type => annotatable.class.name,
      :annotatable_id => annotatable.id}  %>  
</div>